<template>
  <div class="demo">
      <h2>机构：{{name}}</h2> 
      <h2>地址：{{address}}</h2>
  </div>
</template>

<script>

export default {
  name:'MySchool',
  data(){
    return{
       name:'尚硅谷',
       address:'北京昌平',
    }
  },
    mounted() {
       this.$bus.$on('hello',(data)=>{
          console.log('我是School组件，我收到了data：'+data);
       })
   },
}
</script>

<style scoped>
  .demo{
     background-color: brown;
     padding: 5px;
  }
</style>